<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Giang extends CI_Controller {
	
	public function index() {
		
		$this->load->helper('aescipher');
		$cipher = new AESCipher();
		$a = $cipher->encrypt('xin chào Việt Nam');
		
		echo $a."<br />";
		echo $cipher->decrypt($a);
		echo "<br />";
		echo $cipher->decrypt('zufwkAzw2BkC8hkn6tEC0FrdRWb4qf0QsfBm8iB5kPO7XJSHN61lGo+ODsJ6FEQm');
		
// 		$this->load->model('math');
// 		$data = array(
// 				'val1' => 2,
// 				'val2' => 100,
// 				'title' => "Welcome to CodeIgniter tutorial"
// 				);
		
// 		$data['sumResult'] = $this->math->add($data['val1'], $data['val2']);
		
// 		$this->load->view('hello_view', $data);
	}
	
	public function hello() {
		echo "hello world";
	}
	
	public function data() {
		$this->load->model('userinfo');
		$data = $this->userinfo->getAllInfo();
		var_dump($data);
		
	}
	
	public function test() {
		var_dump(APPPATH);
		var_dump(FCPATH);
		var_dump(BASEPATH);
// 		$data = file_get_contents("./res/test.xml");
		$data = read_file("application/res/test.xml");
		var_dump($data);
	}
	
	
}
